import React, { useState } from 'react';
import { Form, Input, Button, Select, InputNumber, Space, Tooltip } from 'antd';
import { SearchOutlined, SettingOutlined, ClearOutlined, DownloadOutlined } from '@ant-design/icons';

const { Option } = Select;

interface MethodFilterBarProps {
    onSearch: (values: any) => void;
    onExport?: (values: any) => void;
    exportLoading?: boolean;
}

const MethodFilterBar: React.FC<MethodFilterBarProps> = ({ onSearch, onExport, exportLoading = false }) => {
    const [form] = Form.useForm();
    const [advancedVisible, setAdvancedVisible] = useState(false);
    const [searchKeyword, setSearchKeyword] = useState('');

    // 通用搜索处理
    const handleQuickSearch = (keyword: string) => {
        setSearchKeyword(keyword);

        if (!keyword.trim()) {
            onSearch({});
            return;
        }

        // 将关键词同时应用到包名、类名、方法名
        const searchParams = {
            packageName: keyword.trim(),
            className: keyword.trim(),
            methodName: keyword.trim(),
            _isQuickSearch: true // 标记为快速搜索
        };

        onSearch(searchParams);
    };

    // 高级搜索处理
    const handleAdvancedSearch = (values: any) => {
        // 过滤掉空值
        const filteredValues = Object.keys(values).reduce((acc, key) => {
            if (values[key] !== undefined && values[key] !== null && values[key] !== '') {
                acc[key] = values[key];
            }
            return acc;
        }, {} as any);

        onSearch(filteredValues);
    };

    // 清除所有搜索条件
    const handleClearAll = () => {
        setSearchKeyword('');
        form.resetFields();
        onSearch({});
    };

    // 获取当前筛选条件
    const getCurrentFilterValues = () => {
        const serviceType = form.getFieldValue('serviceType');
        const isEntry = form.getFieldValue('isEntry');
        const hasSaRecord = form.getFieldValue('hasSaRecord');
        const hasApmRecord = form.getFieldValue('hasApmRecord');
        const callFrequency = form.getFieldValue('callFrequency');
        const deprecationLevel = form.getFieldValue('deprecationLevel');
        const orderBy = form.getFieldValue('orderBy');
        const orderByType = form.getFieldValue('orderByType');

        const baseParams = {
            ...(serviceType && { serviceType }),
            ...(isEntry && { isEntry }),
            ...(hasSaRecord !== undefined && hasSaRecord !== null && { hasSaRecord: hasSaRecord === 'true' }),
            ...(hasApmRecord !== undefined && hasApmRecord !== null && { hasApmRecord: hasApmRecord === 'true' }),
            ...(callFrequency && { callFrequency }),
            ...(deprecationLevel && { deprecationLevel }),
            ...(orderBy && { orderBy }),
            ...(orderByType && { orderByType })
        };

        if (searchKeyword.trim()) {
            // 通用搜索 + 筛选条件
            return {
                packageName: searchKeyword.trim(),
                className: searchKeyword.trim(),
                methodName: searchKeyword.trim(),
                keyword: searchKeyword.trim(),
                _isQuickSearch: true,
                ...baseParams
            };
        } else {
            // 获取高级查询的所有字段
            const allValues = form.getFieldsValue();
            return {
                ...baseParams,
                ...Object.keys(allValues).reduce((acc, key) => {
                    if (allValues[key] !== undefined && allValues[key] !== null && allValues[key] !== '') {
                        acc[key] = allValues[key];
                    }
                    return acc;
                }, {} as any)
            };
        }
    };

    // 处理导出
    const handleExport = () => {
        if (onExport) {
            const filterValues = getCurrentFilterValues();
            onExport(filterValues);
        }
    };

    // 联动逻辑：服务类型和是否入口
    const handleServiceTypeChange = (value: string) => {
        // 移除自动设置是否入口的逻辑，让用户自由选择
        // 服务类型和是否入口现在是独立的筛选条件
    };

    const handleIsEntryChange = (value: string) => {
        // 移除联动逻辑，让是否入口成为独立的筛选条件
        // 用户可以自由组合服务类型和是否入口的条件
    };

    return (
        <div style={{
            background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
            padding: '12px 16px',
            borderRadius: '12px',
            marginBottom: '16px',
            boxShadow: '0 8px 32px rgba(102, 126, 234, 0.15)'
        }}>
            {/* 主搜索区域 */}
            <div style={{ marginBottom: 12 }}>
                <div style={{
                    background: '#fff',
                    borderRadius: '8px',
                    padding: '12px',
                    boxShadow: '0 2px 8px rgba(0,0,0,0.1)'
                }}>
                    {/* 搜索框和常用筛选 */}
                    <Form layout="inline" form={form} style={{ width: '100%' }}>
                        <div style={{ display: 'flex', gap: '12px', alignItems: 'flex-end', flexWrap: 'wrap', width: '100%' }}>
                            {/* 通用搜索框 */}
                            <div style={{ flex: 1, minWidth: '300px' }}>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    🔍 通用搜索
                                </label>
                                <Input
                                    size="middle"
                                    placeholder="输入关键词搜索包名、类名或方法名..."
                                    value={searchKeyword}
                                    onChange={(e) => setSearchKeyword(e.target.value)}
                                    onPressEnter={() => handleQuickSearch(searchKeyword)}
                                    prefix={<SearchOutlined style={{ color: '#bfbfbf' }} />}
                                    allowClear
                                    onClear={() => handleQuickSearch('')}
                                    style={{ borderRadius: '6px' }}
                                />
                            </div>

                            {/* 服务类型 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    🏷️ 服务类型
                                </label>
                                <Form.Item name="serviceType" style={{ margin: 0 }}>
                                    <Select
                                        size="middle"
                                        style={{ width: 140 }}
                                        allowClear
                                        placeholder="选择类型"
                                        onChange={handleServiceTypeChange}
                                    >
                                        <Option value="DUBBO">DUBBO</Option>
                                        <Option value="REST">REST</Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 是否入口 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    🚪 是否入口
                                </label>
                                <Form.Item name="isEntry" style={{ margin: 0 }}>
                                    <Select
                                        size="middle"
                                        style={{ width: 100 }}
                                        allowClear
                                        onChange={handleIsEntryChange}
                                        placeholder="选择"
                                    >
                                        <Option value="true">是</Option>
                                        <Option value="false">否</Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 快速筛选：SA记录 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    📊 SA记录
                                </label>
                                <Form.Item name="hasSaRecord" style={{ margin: 0 }}>
                                    <Select
                                        size="middle"
                                        style={{ width: 120 }}
                                        allowClear
                                        placeholder="SA筛选"
                                    >
                                        <Option value="true">有SA记录</Option>
                                        <Option value="false">无SA记录</Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 快速筛选：APM记录 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    📈 APM记录
                                </label>
                                <Form.Item name="hasApmRecord" style={{ margin: 0 }}>
                                    <Select
                                        size="middle"
                                        style={{ width: 120 }}
                                        allowClear
                                        placeholder="APM筛选"
                                    >
                                        <Option value="true">有APM记录</Option>
                                        <Option value="false">无APM记录</Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 调用频次筛选 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '4px',
                                    fontSize: '13px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    📞 调用频次
                                </label>
                                <Form.Item name="callFrequency" style={{ margin: 0 }}>
                                    <Select
                                        size="middle"
                                        style={{ width: 120 }}
                                        allowClear
                                        placeholder="选择频次"
                                    >
                                        <Option value="high">
                                            <span style={{ color: '#52c41a', fontWeight: 500 }}>● 高频</span>
                                        </Option>
                                        <Option value="medium">
                                            <span style={{ color: '#fadb14', fontWeight: 500 }}>● 中频</span>
                                        </Option>
                                        <Option value="low">
                                            <span style={{ color: '#fa8c16', fontWeight: 500 }}>● 低频</span>
                                        </Option>
                                        <Option value="zero">
                                            <span style={{ color: '#ff4d4f', fontWeight: 500 }}>● 零调用</span>
                                        </Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 废弃风险筛选 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '6px',
                                    fontSize: '14px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    ⚠️ 废弃风险
                                </label>
                                <Form.Item name="deprecationLevel" style={{ margin: 0 }}>
                                    <Select
                                        size="large"
                                        style={{ width: 140 }}
                                        allowClear
                                        placeholder="选择风险"
                                    >
                                        <Option value="EXTREME_RISK">
                                            <span style={{ color: '#cf1322', fontWeight: 500 }}>● 极高风险</span>
                                        </Option>
                                        <Option value="HIGH_RISK">
                                            <span style={{ color: '#ff4d4f', fontWeight: 500 }}>● 高风险</span>
                                        </Option>
                                        <Option value="MEDIUM_RISK">
                                            <span style={{ color: '#fa8c16', fontWeight: 500 }}>● 中等风险</span>
                                        </Option>
                                        <Option value="LOW_RISK">
                                            <span style={{ color: '#fadb14', fontWeight: 500 }}>● 低风险</span>
                                        </Option>
                                        <Option value="MINIMAL_RISK">
                                            <span style={{ color: '#52c41a', fontWeight: 500 }}>● 极低风险</span>
                                        </Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 快速排序 */}
                            <div>
                                <label style={{
                                    display: 'block',
                                    marginBottom: '6px',
                                    fontSize: '14px',
                                    fontWeight: '500',
                                    color: '#333'
                                }}>
                                    🔄 快速排序
                                </label>
                                <Form.Item name="quickSort" style={{ margin: 0 }}>
                                    <Select
                                        size="large"
                                        style={{ width: 180 }}
                                        allowClear
                                        placeholder="选择排序方式"
                                        onChange={(value) => {
                                            if (value) {
                                                const [orderBy, orderByType] = value.split('_');
                                                form.setFieldsValue({ orderBy, orderByType });
                                            } else {
                                                form.setFieldsValue({ orderBy: undefined, orderByType: undefined });
                                            }
                                        }}
                                    >
                                        <Option value="noCodeChangeDurationDays_desc">📅 修改时间 ↓</Option>
                                        <Option value="noCodeChangeDurationDays_asc">📅 修改时间 ↑</Option>
                                        <Option value="lastInvocationTime_desc">📞 调用时间 ↓</Option>
                                        <Option value="lastInvocationTime_asc">📞 调用时间 ↑</Option>
                                        <Option value="deprecationScore_desc">⚠️ 废弃风险 ↓</Option>
                                        <Option value="deprecationScore_asc">⚠️ 废弃风险 ↑</Option>
                                    </Select>
                                </Form.Item>
                            </div>

                            {/* 搜索按钮 */}
                            <div>
                                <Button
                                    type="primary"
                                    size="large"
                                    onClick={() => {
                                        const serviceType = form.getFieldValue('serviceType');
                                        const isEntry = form.getFieldValue('isEntry');
                                        const hasSaRecord = form.getFieldValue('hasSaRecord');
                                        const hasApmRecord = form.getFieldValue('hasApmRecord');
                                        const callFrequency = form.getFieldValue('callFrequency');
                                        const deprecationLevel = form.getFieldValue('deprecationLevel');
                                        const orderBy = form.getFieldValue('orderBy');
                                        const orderByType = form.getFieldValue('orderByType');

                                        const baseParams = {
                                            ...(serviceType && { serviceType }),
                                            ...(isEntry && { isEntry }),
                                            ...(hasSaRecord !== undefined && hasSaRecord !== null && { hasSaRecord: hasSaRecord === 'true' }),
                                            ...(hasApmRecord !== undefined && hasApmRecord !== null && { hasApmRecord: hasApmRecord === 'true' }),
                                            ...(callFrequency && { callFrequency }),
                                            ...(deprecationLevel && { deprecationLevel }),
                                            ...(orderBy && { orderBy }),
                                            ...(orderByType && { orderByType })
                                        };

                                        if (searchKeyword.trim()) {
                                            // 通用搜索 + 筛选条件
                                            const searchParams = {
                                                packageName: searchKeyword.trim(),
                                                className: searchKeyword.trim(),
                                                methodName: searchKeyword.trim(),
                                                _isQuickSearch: true,
                                                ...baseParams
                                            };
                                            onSearch(searchParams);
                                        } else if (Object.keys(baseParams).length > 0) {
                                            // 仅筛选/排序条件
                                            onSearch(baseParams);
                                        } else {
                                            // 无条件搜索
                                            onSearch({});
                                        }
                                    }}
                                    icon={<SearchOutlined />}
                                    style={{
                                        background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
                                        border: 'none',
                                        borderRadius: '6px',
                                        height: '40px',
                                        paddingLeft: '24px',
                                        paddingRight: '24px'
                                    }}
                                >
                                    搜索
                                </Button>
                            </div>
                        </div>
                    </Form>
                </div>

                {/* 操作按钮区 */}
                <div style={{
                    marginTop: 12,
                    display: 'flex',
                    justifyContent: 'space-between',
                    alignItems: 'center'
                }}>
                    <div style={{ display: 'flex', gap: '12px' }}>
                        <Button
                            type="text"
                            size="small"
                            icon={<SettingOutlined />}
                            onClick={() => setAdvancedVisible(!advancedVisible)}
                            style={{
                                color: '#fff',
                                fontWeight: '500'
                            }}
                        >
                            {advancedVisible ? '收起高级查询' : '展开高级查询'}
                        </Button>

                        {onExport && (
                            <Button
                                type="text"
                                size="small"
                                icon={<DownloadOutlined />}
                                onClick={handleExport}
                                loading={exportLoading}
                                style={{
                                    color: '#fff',
                                    fontWeight: '500'
                                }}
                            >
                                导出当前数据
                            </Button>
                        )}
                    </div>

                    <Button
                        type="text"
                        size="small"
                        icon={<ClearOutlined />}
                        onClick={handleClearAll}
                        style={{
                            color: '#fff',
                            fontWeight: '500'
                        }}
                    >
                        清除所有条件
                    </Button>
                </div>
            </div>

            {/* 高级查询面板 */}
            {advancedVisible && (
                <div style={{
                    background: 'rgba(255, 255, 255, 0.95)',
                    padding: '20px',
                    borderRadius: '8px',
                    backdropFilter: 'blur(10px)',
                    border: '1px solid rgba(255, 255, 255, 0.2)',
                    boxShadow: '0 4px 12px rgba(0,0,0,0.1)'
                }}>
                    <div style={{
                        fontSize: '16px',
                        fontWeight: '600',
                        color: '#333',
                        marginBottom: '16px',
                        display: 'flex',
                        alignItems: 'center'
                    }}>
                        ⚙️ 高级查询条件
                    </div>

                    <Form
                        layout="inline"
                        form={form}
                        onFinish={handleAdvancedSearch}
                        style={{ gap: '12px' }}
                    >
                        {/* 隐藏的排序字段 */}
                        <Form.Item name="orderBy" style={{ display: 'none' }}>
                            <Input />
                        </Form.Item>
                        <Form.Item name="orderByType" style={{ display: 'none' }}>
                            <Input />
                        </Form.Item>
                        {/* 精确字段查询 */}
                        <div style={{ width: '100%', marginBottom: '16px' }}>
                            <div style={{
                                fontSize: '14px',
                                fontWeight: '500',
                                color: '#666',
                                marginBottom: '8px'
                            }}>
                                📍 精确字段查询
                            </div>
                            <div style={{ display: 'flex', gap: '12px', flexWrap: 'wrap' }}>
                                <Form.Item name="packageName" label="包名">
                                    <Input
                                        placeholder="精确包名查询"
                                        allowClear
                                        style={{ width: 200 }}
                                    />
                                </Form.Item>

                                <Form.Item name="className" label="类名">
                                    <Input
                                        placeholder="精确类名查询"
                                        allowClear
                                        style={{ width: 200 }}
                                    />
                                </Form.Item>

                                <Form.Item name="methodName" label="方法名">
                                    <Input
                                        placeholder="精确方法名查询"
                                        allowClear
                                        style={{ width: 200 }}
                                    />
                                </Form.Item>

                                <Form.Item name="serviceName" label="服务名">
                                    <Input
                                        placeholder="服务名查询"
                                        allowClear
                                        style={{ width: 220 }}
                                    />
                                </Form.Item>
                            </div>
                        </div>

                        {/* 状态和类型查询 */}
                        <div style={{ width: '100%', marginBottom: '16px' }}>
                            <div style={{
                                fontSize: '14px',
                                fontWeight: '500',
                                color: '#666',
                                marginBottom: '8px'
                            }}>
                                🏷️ 状态和类型查询
                            </div>
                            <div style={{ display: 'flex', gap: '12px', flexWrap: 'wrap' }}>
                                <Form.Item name="serviceType" label="服务类型">
                                    <Select
                                        placeholder="选择服务类型"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="DUBBO">DUBBO</Option>
                                        <Option value="REST">REST</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="isEntry" label="是否入口">
                                    <Select
                                        placeholder="选择是否入口"
                                        allowClear
                                        style={{ width: 120 }}
                                    >
                                        <Option value="true">是</Option>
                                        <Option value="false">否</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="codeStatus" label="代码状态">
                                    <Select
                                        placeholder="选择代码状态"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="NORMAL">正常</Option>
                                        <Option value="DELETED">已删除</Option>
                                        <Option value="OTHER">其他</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="runtimeStatus" label="运行状态">
                                    <Select
                                        placeholder="选择运行状态"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="ONLINE">在线</Option>
                                        <Option value="OFFLINE">离线</Option>
                                        <Option value="OTHER">其他</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="deprecationLevel" label="废弃风险">
                                    <Select
                                        placeholder="选择废弃风险"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="EXTREME_RISK">
                                            <span style={{ color: '#cf1322', fontWeight: 500 }}>● 极高风险</span>
                                        </Option>
                                        <Option value="HIGH_RISK">
                                            <span style={{ color: '#ff4d4f', fontWeight: 500 }}>● 高风险</span>
                                        </Option>
                                        <Option value="MEDIUM_RISK">
                                            <span style={{ color: '#fa8c16', fontWeight: 500 }}>● 中等风险</span>
                                        </Option>
                                        <Option value="LOW_RISK">
                                            <span style={{ color: '#fadb14', fontWeight: 500 }}>● 低风险</span>
                                        </Option>
                                        <Option value="MINIMAL_RISK">
                                            <span style={{ color: '#52c41a', fontWeight: 500 }}>● 极低风险</span>
                                        </Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="hasSaRecord" label="SA记录">
                                    <Select
                                        placeholder="选择SA记录"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="true">有SA记录</Option>
                                        <Option value="false">无SA记录</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="hasApmRecord" label="APM记录">
                                    <Select
                                        placeholder="选择APM记录"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="true">有APM记录</Option>
                                        <Option value="false">无APM记录</Option>
                                    </Select>
                                </Form.Item>

                                <Form.Item name="callFrequency" label="调用频次">
                                    <Select
                                        placeholder="选择调用频次"
                                        allowClear
                                        style={{ width: 140 }}
                                    >
                                        <Option value="high">
                                            <span style={{ color: '#52c41a', fontWeight: 500 }}>● 高频</span>
                                        </Option>
                                        <Option value="medium">
                                            <span style={{ color: '#fadb14', fontWeight: 500 }}>● 中频</span>
                                        </Option>
                                        <Option value="low">
                                            <span style={{ color: '#fa8c16', fontWeight: 500 }}>● 低频</span>
                                        </Option>
                                        <Option value="zero">
                                            <span style={{ color: '#ff4d4f', fontWeight: 500 }}>● 零调用</span>
                                        </Option>
                                    </Select>
                                </Form.Item>
                            </div>
                        </div>

                        {/* 时间范围查询 */}
                        <div style={{ width: '100%', marginBottom: '16px' }}>
                            <div style={{
                                fontSize: '14px',
                                fontWeight: '500',
                                color: '#666',
                                marginBottom: '8px'
                            }}>
                                ⏱️ 时间范围查询
                            </div>
                            <div style={{ display: 'flex', gap: '12px', flexWrap: 'wrap' }}>
                                <Form.Item name="noSaCallDurationDays" label="累计无调用时长">
                                    <Tooltip title="查找累计无调用时长大于等于指定天数的方法">
                                        <InputNumber
                                            min={0}
                                            placeholder="天数"
                                            style={{ width: 120 }}
                                            addonAfter="天"
                                        />
                                    </Tooltip>
                                </Form.Item>

                                <Form.Item name="noCodeChangeDurationDays" label="累计无修改时长">
                                    <Tooltip title="查找累计无修改时长大于等于指定天数的方法">
                                        <InputNumber
                                            min={0}
                                            placeholder="天数"
                                            style={{ width: 120 }}
                                            addonAfter="天"
                                        />
                                    </Tooltip>
                                </Form.Item>

                                <Form.Item name="deprecationScoreMin" label="废弃分数下限">
                                    <Tooltip title="查找废弃分数大于等于指定值的方法">
                                        <InputNumber
                                            min={0}
                                            max={100}
                                            placeholder="0-100"
                                            style={{ width: 120 }}
                                            addonAfter="分"
                                        />
                                    </Tooltip>
                                </Form.Item>

                                <Form.Item name="deprecationScoreMax" label="废弃分数上限">
                                    <Tooltip title="查找废弃分数小于等于指定值的方法">
                                        <InputNumber
                                            min={0}
                                            max={100}
                                            placeholder="0-100"
                                            style={{ width: 120 }}
                                            addonAfter="分"
                                        />
                                    </Tooltip>
                                </Form.Item>
                            </div>
                        </div>

                        {/* 操作按钮 */}
                        <div style={{ width: '100%', textAlign: 'center' }}>
                            <Space size="middle">
                                <Button
                                    type="primary"
                                    htmlType="submit"
                                    icon={<SearchOutlined />}
                                    size="large"
                                    style={{
                                        background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
                                        border: 'none',
                                        borderRadius: '6px',
                                        paddingLeft: '24px',
                                        paddingRight: '24px'
                                    }}
                                >
                                    执行高级查询
                                </Button>
                                <Button
                                    htmlType="button"
                                    onClick={() => form.resetFields()}
                                    icon={<ClearOutlined />}
                                    size="large"
                                    style={{
                                        borderRadius: '6px',
                                        paddingLeft: '20px',
                                        paddingRight: '20px'
                                    }}
                                >
                                    重置条件
                                </Button>
                            </Space>
                        </div>
                    </Form>
                </div>
            )}
        </div>
    );
};

export default MethodFilterBar; 